package cn.timelost.hr.dao;

import cn.timelost.hr.pojo.Attendance;
import cn.timelost.hr.pojo.Attendance2;
import cn.timelost.hr.vo.UnAttendanceVo;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;

import java.sql.Date;
import java.util.Collection;
import java.util.List;


/**
 * @author 25940
 * @description 针对表【attendance(签到情况：序列号（主）、员工编号（外）、日期、时间、情况成功1迟到2缺勤)】的数据库操作Mapper
 * @createDate 2022-04-01 14:13:55
 * @Entity generator.domain.Attendance
 */
public interface AttendanceDao {

    int deleteByPrimaryKey(Long id);

    int deleteByPID();

    int insert(Attendance record);

    int insertSelective(Attendance record);

    Attendance selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Attendance record);

    int updateByPrimaryKey(Attendance record);

    Attendance getStatusInt(@Param("personId") Integer person_id, @Param("date") Date date);

    List<Attendance> selectAll(@Param("personId") Integer personId,
                               @Param("beginDate") java.util.Date beginDate,
                               @Param("endDate") java.util.Date endDate);

    int deleteByIdIn(@Param("idList") Collection<Integer> idList);

    @Options(flushCache = Options.FlushCachePolicy.TRUE)
    List<Attendance2> selectView(@Param("personId") Integer personId,
                                 @Param("beginDate") java.util.Date beginDate,
                                 @Param("endDate") java.util.Date endDate);

    int getAttendance0();
    int getAttendance1();
    int getAttendance2();
    int getAttendanceS();

    List<UnAttendanceVo> getUnAttendance();
    void updatefake();
    void updatefake2();
}
